<?php

namespace App\Console\Commands;


use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;

class initSystem extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'init:system';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '初始化系统相关信息';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        DB::table('users_base')->truncate();
        DB::table('users_auth')->truncate();
        DB::table('users_info')->truncate();
        DB::table('users_wallet')->truncate();
        DB::table('users_login_logs')->truncate();
        DB::table('user_sign_record')->truncate();
        DB::table('user_wd')->truncate();

        DB::table('recharge_record')->truncate();

        DB::table('cms_notice_user')->truncate();
        DB::table('cms_message')->truncate();

        DB::table('shop_order')->truncate();
        DB::table('shop_order_goods')->truncate();
        DB::table('shop_goods_agent')->truncate();
        DB::table('shop_user_address')->truncate();
        DB::table('shop_cart')->truncate();
        DB::table('shop_order_goods_evaluate')->truncate();
        DB::table('shop_user_coupon')->truncate();
        DB::table('account_flow')->truncate();
        DB::table('account_correct')->truncate();
        DB::table('bonus_record')->truncate();
        DB::table('bonus_count')->truncate();
        DB::table('bonus_pools')->truncate();
        DB::table('user_achievement')->truncate();
        DB::table('cms_article')->truncate();
        DB::table('cms_article_cat')->truncate();
        DB::table('cms_news')->truncate();
        DB::table('cms_news_cat')->truncate();
        DB::table('cms_notice')->truncate();
        DB::table('logs_admin')->truncate();
        DB::table('logs_home')->truncate();
        DB::table('manage_admins_log')->truncate();
        DB::table('plat_finance')->truncate();
        DB::table('shop_ad')->truncate();
        DB::table('shop_ad_info')->truncate();
        $this->info('信息初始化成功');
    }
}
